#lang sicp
(define (element-of-set? element set)
  (cond ((null? set) #f)
        ((equal? (car set) element)
         #t)
        (else
         (element-of-set? element (cdr set)))))
(define (adjoin-set element set)
  (cons element set))
(define (union-set set1 set2)
  (append set1 set2))
(define (intersection-set set1 set2)
  (cond ((or (null? set1) (null? set2)) nil)
        ((element-of-set? (car set1) set2)
         (cons (car set1) (intersection-set (cdr set1) set2)))
        (else
         (intersection-set (cdr set1) set2))))